<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base target="_self">
<title>单位管理</title>
<script>
	function retrunValue() {
		var $item = $("input[name='radio']:checked").val();
		var $item1 = $("input:checked").attr("id");
		var $math = $item1.substring(5,6);
		var $orgName = $("#orgName"+$math).html();
		window.returnValue = {id:$item,orgName:$orgName};
		window.close();
	}
</script>
</head>
<body>
	<form id="mainForm" action="" method="get">
		<input type="hidden" name="page.pageNo" id="pageNo"
			value="${page.pageNo}" /> <input type="hidden" name="page.orderBy"
			id="orderBy" value="${page.orderBy}" /> <input type="hidden"
			name="page.order" id="order" value="${page.order}" />
		<div id="message">
			<s:actionmessage theme="custom" cssClass="success" />
		</div>
		<div id="filter">
			单位名称: <input type="text" name="filter_EQS_orgName"
				value="${param['filter_EQS_orgName']}" size="9" /> 主管部门: <input
				type="text" name="filter_LIKES_burderDep"
				value="${param['filter_LIKES_burderDep'] }" size="9" /> 机构代码证: <input
				type="text" name="filter_LIKES_orgNum"
				value="${param['filter_LIKES_orgNum'] }" size="9" /> <input
				type="button" value="搜索" onclick="search();" />
		</div>
		<div id="content">
			<table id="contentTable">
				<tr>
					<th>选择</th>
					<th><a href="javascript:sort('orgName','asc')">单位名称</a>
					</th>
					<th><a href="javascript:sort('burderDep','asc')">主管部门</a>
					</th>
					<th><a href="javascript:sort('orgNum','asc')">机构代码证</a>
					</th>
					<th><a href="javascript:sort('fatherOrgan','asc')">上级单位</a>
					</th>
					<th>单位类型</th>
					<th>行政级别</th>
					<th>单位主页</th>
					<th>成立时间</th>
				</tr>

				<c:forEach items="${allExternalOrganizationList }" var="organization" varStatus="var">
					<tr>
						<td><input type="radio" name="radio" id="radio${var.count }"
							value="<c:out value='${organization.id}'/>" />
						</td>
						<td id="orgName${var.count}">${organization.orgName}</td>
						<td>${organization.burderDep}&nbsp;</td>
						<td>${organization.orgNum}&nbsp;</td>
						<td>${organization.organization.orgName}&nbsp;</td>
						<td>${organization.type == 0?'内部单位':'外部单位' }</td>
						<td>${organization.politicsLevel}&nbsp;</td>
						<td><a href="${organization.orgHome }">${organization.orgHome
								}</a>
						</td>
						<td>${organization.finishDate }</td>
					</tr>
				</c:forEach>
				<tr>
					<td colspan="8"><input type="button" onclick="retrunValue()" value="提交" /><input
						type="button" onclick="JavaScript:window.close();" value="关闭" /></td>
				</tr>
			</table>
		</div>

		<div>
			第${page.pageNo}页, 共${page.totalPages}页 <a
				href="javascript:jumpPage(1)">首页</a>
			<s:if test="page.hasPre">
				<a href="javascript:jumpPage(${page.prePage})">上一页</a>
			</s:if>
			<s:if test="page.hasNext">
				<a href="javascript:jumpPage(${page.nextPage})">下一页</a>
			</s:if>
			<a href="javascript:jumpPage(${page.totalPages})">末页</a>
		</div>
	</form>

</body>
</html>